/*
 * @Author: only
 * @Date: 2025-03-06 16:56:15
 * @LastEditors: sueRimn
 * @LastEditTime: 2025-04-25 15:15:14
 */
import request from "@/utils/request";

// 查询公司列表
export function vendorInfoList(data) {
  return request({
    url: "/vendor/info/list",
    method: "post",
    data: data,
  });
}
// 获取动态表单
export function vendorInfoDynamicForm(data) {
  return request({
    url: "/vendor/info/dynamic_form",
    method: "post",
    data: data,
  });
}

// 获取公司详细信息
export function vendorInfoGetInfo(data) {
  return request({
    url: "/vendor/info/get_info",
    method: "post",
    data: data,
    ext: {
      loading: true,
    },
  });
}

// 新增公司信息
export function vendorInfoAdd(data) {
  return request({
    url: "/vendor/info/add",
    method: "post",
    data: data,
  });
}

// 更新公司信息
export function vendorInfoUpdate(data) {
  return request({
    url: "/vendor/info/update",
    method: "post",
    data: data,
  });
}

// 删除
export function vendorInfoBatchDelete(data) {
  return request({
    url: "/vendor/info/batch_delete",
    method: "post",
    data: data,
  });
}

// 分配经办人
export function vendorInfoAllocation(data) {
  return request({
    url: "/vendor/info/allocation",
    method: "post",
    data: data,
    ext: {
      loading: true,
    },
  });
}

//导入模版上传
export function importData(deptId,data) {
  return request({
    url: `/vendor/info/import_data?deptId=${deptId}`,
    method: "post",
    data: data,
    contentType: "multipart/form-data",
  });
}

//同步生产科系统数据
export function updataSyncOldSystem(data) {
  return request({
    url: `/vendor/info/sync_old_system`,
    method: "post",
    data: data
  });
}
